export default interface CategoryCardCoupon {
    chooseCard(param: IWxJsSDKChooseCardParam): void;

    addCard(param: IWxJsSDKAddCardParam): void;

    openCard(param: { cardList: IWxJsSDKOpenCard[]; }): void;
}

export interface IWxJsSDKOpenCard {
    cardId: string;
    code: string;
}

export interface IWxJsSDKAddCard {
    cardId: string;
    cardExt: string;
}

export interface IWxJsSDKAddCardParam {
    cardList: IWxJsSDKAddCard[]; // 需要添加的卡券列表
    success(res: { cardList: any[]; errMsg: string; }): void;
}

export enum WxJsSDKChooseCardSignType {
    SHA1 = 'SHA1',
}

export interface IWxJsSDKChooseCardParam {
    shopId?: string; // 门店Id
    cardType?: string; // 卡券类型
    cardId?: string; // 卡券Id
    timestamp: number; // 卡券签名时间戳
    nonceStr: string; // 卡券签名随机串
    signType: WxJsSDKChooseCardSignType; // 签名方式，默认'SHA1'
    cardSign: string; // 卡券签名
    success(res: { cardList: any[]; errMsg: string; }): void;
}
